import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-10-13
 * Time: 19:47
 */
class Printer {
    private String name;
    private double price;
    private static Printer m;

    private Printer(String s,double p){
        this.name=s;
        this.price=p;
    }

    public static Printer getM(String name,double price) {
        if(m==null) {
            m = new Printer(name,price);
        }
        return m;
    }

    @Override
    public String toString() {
        return "型号为："+this.name+",价格为："+this.price;
    }
}
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String name1 = sc.next();
        double prize1 = sc.nextDouble();
        sc.nextLine();
        String name2 = sc.next();
        double prize2 = sc.nextDouble();
        Printer s1 = Printer.getM(name1,prize1);
        Printer s2 = Printer.getM(name2,prize2);
        System.out.println(s1.toString());
        System.out.println(s2.toString());

    }
}
